<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>文件上传</title>
    <link th:href="@{/bootstrap-5.0.2-dist/css/bootstrap.css}" rel="stylesheet" type="text/css"/>
    <script th:src="@{/bootstrap-5.0.2-dist/js/bootstrap.js}" src="/bootstrap-5.0.2-dist/js/bootstrap.js"></script>
</head>
<body>

<div class="container">
    <h3>文件上传</h3>
    <form action="/fileUpload" method="post" enctype="multipart/form-data">
        <div class="form-group">
            <label for="title">标题</label>
            <input type="text" class="form-control" id="title" name="title" placeholder="标题">
        </div>
        <div class="form-group">
            <label for="uploadfile">文件上传</label>
            <input class="form-control" type="file" name="uploadfile" id="uploadfile">
        </div>
        <button type="submit" class="btn btn-primary">提交</button>
    </form>
</div>
</div>

<hr>
<div class="container">
    <h3>文件下载</h3>
    <a th:href="@{/download(filename='工匠精神.jpeg')}">
        文件下载
    </a>
</div>
</body>
</html>